program teste;


var
  a, b, c, media: real;
  
begin
  a:=1;
  b:=2;
  c:=5;
  if (a>=b) {and (a>=c)} then
    media := a * 0.5 + b * 0.25 + c * 0.25;
  if (b>=a) {and (b>=c)} then
    media := a * 0.25 + b* 0.5 + c * 0.25; 
  if (c>=a) {and (c>=b)} then
    media := a * 0.25 + b * 0.25 + c * 0.5; 
  if (a=b) {and (a=c)} then
    media := a;
end.
